var Reporter = function(creator){
this.creator = creator;
		this.reportEndGame = function(){
		this.creator.creator.context.fillStyle = "rgb(120,120,120)";
		this.creator.creator.context.font = '400 19px/2 Unknown Font, sans-serif';

		this.creator.creator.context.fillRect(0,0,this.creator.creator.canvas.width,this.creator.creator.canvas.height);
		this.creator.creator.context.fillStyle = this.creator.color(true,1);		
		var percentageCorrect = Math.round(1000-1000*this.creator.gamePlay.mistakes/(this.creator.gamePlay.turns-this.creator.gamePlay.nBack))/10;

		var message = "               RESULTS               "
		this.creator.creator.context.fillText(message,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2-60);

		this.creator.creator.context.fillStyle = "rgb(255,255,255)";

		var messageValues = [];
		var messageValueWidth = 0;
		messageValues["2_0"] = percentageCorrect+"%";
		messageValues["3_0"] = Math.round(this.creator.gamePlay.timeSpent/10)/100+"s";
		messageValues["4_0"] = this.creator.gamePlay.level;
		this.creator.gamePlay.reportCorrect(percentageCorrect);		
		messageValues["5_0"] = this.creator.gamePlay.level;

		var testLength;		
		for(var x in messageValues)
		{
		testLength = this.creator.creator.context.measureText(messageValues[x]).width;
			if(testLength>messageValueWidth)
			{
			messageValueWidth = testLength;
			}
		}
		var message2 = "Correct:";
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2-30);
		this.creator.creator.context.fillText(messageValues["2_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2-30);

		message2 = "Time used:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+0);			
		this.creator.creator.context.fillText(messageValues["3_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+0);			

		message2 = "Moved from level:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+30);			
		this.creator.creator.context.fillText(messageValues["4_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+30);

		message2 = "Moved to level:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+60);
		this.creator.creator.context.fillText(messageValues["5_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+60);

		message2 = "[Press space/up to continue]";
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message2).width/2,this.creator.creator.canvas.height/2+90);
		
		createCookie("level",this.creator.gamePlay.level,100);
		}
		
	this.reportStartGame = function(){
		this.creator.creator.context.font = '400 19px/2 Unknown Font, sans-serif';		
		this.creator.creator.context.fillStyle = this.creator.color(true,1);
		
		var message = "             GET READY             "
		this.creator.creator.context.fillText(message,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2-60);

		this.creator.creator.context.fillStyle = "rgb(255,255,255)";

		var messageValues = [];
		var messageValueWidth = 0;
		var testLength;
		
		messageValues["2_0"] = this.creator.gamePlay.nBack;
		messageValues["3_0"] = this.creator.gamePlay.turns-this.creator.gamePlay.nBack;
		messageValues["4_0"] = this.creator.gamePlay.gameSetup.percentageProgress+"%";
		messageValues["5_0"] = this.creator.gamePlay.gameSetup.percentageRegress+"%";

		for(var x in messageValues)
		{
		testLength = this.creator.creator.context.measureText(messageValues[x]).width;
			if(testLength>messageValueWidth)
			{
			messageValueWidth = testLength;
			}
		}

		var message2 = "N-Back:";
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2-30);
		this.creator.creator.context.fillText(messageValues["2_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2-30);

		message2 = "Turns:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+0);			
		this.creator.creator.context.fillText(messageValues["3_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+0);			

		message2 = "To progress:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+30);			
		this.creator.creator.context.fillText(messageValues["4_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+30);			

		message2 = "To regress:"
		this.creator.creator.context.fillText(message2,this.creator.creator.canvas.width/2-this.creator.creator.context.measureText(message).width/2,this.creator.creator.canvas.height/2+60);			
		this.creator.creator.context.fillText(messageValues["5_0"],this.creator.creator.canvas.width/2+this.creator.creator.context.measureText(message).width/2-messageValueWidth,this.creator.creator.canvas.height/2+60);
	}		
}